/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Cajero;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import org.netbeans.microedition.lcdui.LoginScreen;

/**
 * @author hayner
 */
public class CajeroVisualMIDlet extends MIDlet implements CommandListener {

    private boolean midletPaused = false;

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private LoginScreen acceso;
    private List menuPrincipal;
    private Form ingresarDinero;
    private ChoiceGroup choiceGroup;
    private TextField textField;
    private Form consultarSaldo;
    private StringItem stringItem;
    private Form historial;
    private StringItem stringItem3;
    private StringItem stringItem2;
    private StringItem stringItem1;
    private StringItem stringItem4;
    private List promociones;
    private Form detallePromociones;
    private StringItem stringItem5;
    private Form opciones;
    private ChoiceGroup choiceGroup1;
    private ChoiceGroup choiceGroup2;
    private TextField textField1;
    private Form pagar;
    private ChoiceGroup choiceGroup3;
    private Form compra;
    private StringItem stringItem9;
    private StringItem stringItem8;
    private StringItem stringItem7;
    private StringItem stringItem6;
    private StringItem stringItem10;
    private ImageItem imageItem;
    private Alert alert;
    private Alert alert1;
    private Alert alert2;
    private Form Localizacion;
    private ImageItem imageItem1;
    private Command backCommand;
    private Command okCommand;
    private Command backCommand1;
    private Command backCommand2;
    private Command okCommand2;
    private Command backCommand3;
    private Command okCommand1;
    private Command backCommand4;
    private Command cancelCommand;
    private Command okCommand3;
    private Command backCommand5;
    private Command okCommand4;
    private Command helpCommand;
    private Command backCommand6;
    private Command cancelCommand1;
    private Command okCommand5;
    private Command backCommand7;
    private Command itemCommand;
    private Command backCommand8;
    private Image image1;
    private Image image2;
    //</editor-fold>//GEN-END:|fields|0|

    /**
     * The TaquillaVisualMIDlet constructor.
     */
    public CajeroVisualMIDlet() {
    }

    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
    //</editor-fold>//GEN-END:|methods|0|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
    /**
     * Initilizes the application.
     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
     */
    private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
        // write pre-initialize user code here
//GEN-LINE:|0-initialize|1|0-postInitialize
        // write post-initialize user code here
    }//GEN-BEGIN:|0-initialize|2|
    //</editor-fold>//GEN-END:|0-initialize|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Started point.
     */
    public void startMIDlet() {//GEN-END:|3-startMIDlet|0|3-preAction
        // write pre-action user code here
        switchDisplayable(null, getAcceso());//GEN-LINE:|3-startMIDlet|1|3-postAction
        // write post-action user code here
    }//GEN-BEGIN:|3-startMIDlet|2|
    //</editor-fold>//GEN-END:|3-startMIDlet|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
     */
    public void resumeMIDlet() {//GEN-END:|4-resumeMIDlet|0|4-preAction
        // write pre-action user code here
//GEN-LINE:|4-resumeMIDlet|1|4-postAction
        // write post-action user code here
    }//GEN-BEGIN:|4-resumeMIDlet|2|
    //</editor-fold>//GEN-END:|4-resumeMIDlet|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
    /**
     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
     * @param nextDisplayable the Displayable to be set
     */
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|5-switchDisplayable|0|5-preSwitch
        // write pre-switch user code here
        Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
        if (alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }//GEN-END:|5-switchDisplayable|1|5-postSwitch
        // write post-switch user code here
    }//GEN-BEGIN:|5-switchDisplayable|2|
    //</editor-fold>//GEN-END:|5-switchDisplayable|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
    /**
     * Called by a system to indicated that a command has been invoked on a particular displayable.
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
        // write pre-action user code here
        if (displayable == Localizacion) {//GEN-BEGIN:|7-commandAction|1|155-preAction
            if (command == backCommand8) {//GEN-END:|7-commandAction|1|155-preAction
                // write pre-action user code here
                switchDisplayable(null, getCompra());//GEN-LINE:|7-commandAction|2|155-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|3|18-preAction
        } else if (displayable == acceso) {
            if (command == LoginScreen.LOGIN_COMMAND) {//GEN-END:|7-commandAction|3|18-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|4|18-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|5|124-preAction
        } else if (displayable == compra) {
            if (command == cancelCommand1) {//GEN-END:|7-commandAction|5|124-preAction
                // write pre-action user code here
                switchDisplayable(null, getPagar());//GEN-LINE:|7-commandAction|6|124-postAction
                // write post-action user code here
            } else if (command == itemCommand) {//GEN-LINE:|7-commandAction|7|150-preAction
                // write pre-action user code here
                switchDisplayable(null, getLocalizacion());//GEN-LINE:|7-commandAction|8|150-postAction
                // write post-action user code here
            } else if (command == okCommand5) {//GEN-LINE:|7-commandAction|9|122-preAction
                // write pre-action user code here
                switchDisplayable(getAlert(), getPagar());//GEN-LINE:|7-commandAction|10|122-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|11|54-preAction
        } else if (displayable == consultarSaldo) {
            if (command == backCommand1) {//GEN-END:|7-commandAction|11|54-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|12|54-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|13|79-preAction
        } else if (displayable == detallePromociones) {
            if (command == okCommand2) {//GEN-END:|7-commandAction|13|79-preAction
                // write pre-action user code here
                switchDisplayable(null, getPromociones());//GEN-LINE:|7-commandAction|14|79-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|15|62-preAction
        } else if (displayable == historial) {
            if (command == backCommand2) {//GEN-END:|7-commandAction|15|62-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|16|62-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|17|48-preAction
        } else if (displayable == ingresarDinero) {
            if (command == backCommand) {//GEN-END:|7-commandAction|17|48-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|18|48-postAction
                // write post-action user code here
            } else if (command == okCommand) {//GEN-LINE:|7-commandAction|19|46-preAction
                // write pre-action user code here
                switchDisplayable(getAlert1(), getMenuPrincipal());//GEN-LINE:|7-commandAction|20|46-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|21|22-preAction
        } else if (displayable == menuPrincipal) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|21|22-preAction
                // write pre-action user code here
                menuPrincipalAction();//GEN-LINE:|7-commandAction|22|22-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|23|103-preAction
        } else if (displayable == opciones) {
            if (command == cancelCommand) {//GEN-END:|7-commandAction|23|103-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|24|103-postAction
                // write post-action user code here
            } else if (command == okCommand3) {//GEN-LINE:|7-commandAction|25|101-preAction
                // write pre-action user code here
                switchDisplayable(getAlert2(), getMenuPrincipal());//GEN-LINE:|7-commandAction|26|101-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|27|114-preAction
        } else if (displayable == pagar) {
            if (command == backCommand6) {//GEN-END:|7-commandAction|27|114-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|28|114-postAction
                // write post-action user code here
            } else if (command == okCommand4) {//GEN-LINE:|7-commandAction|29|112-preAction
                // write pre-action user code here
                switchDisplayable(null, getCompra());//GEN-LINE:|7-commandAction|30|112-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|31|66-preAction
        } else if (displayable == promociones) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|31|66-preAction
                // write pre-action user code here
                promocionesAction();//GEN-LINE:|7-commandAction|32|66-postAction
                // write post-action user code here
            } else if (command == backCommand3) {//GEN-LINE:|7-commandAction|33|73-preAction
                // write pre-action user code here
                switchDisplayable(null, getMenuPrincipal());//GEN-LINE:|7-commandAction|34|73-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|35|7-postCommandAction
        }//GEN-END:|7-commandAction|35|7-postCommandAction
        // write post-action user code here
    }//GEN-BEGIN:|7-commandAction|36|
    //</editor-fold>//GEN-END:|7-commandAction|36|

    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: acceso ">//GEN-BEGIN:|16-getter|0|16-preInit
    /**
     * Returns an initiliazed instance of acceso component.
     * @return the initialized component instance
     */
    public LoginScreen getAcceso() {
        if (acceso == null) {//GEN-END:|16-getter|0|16-preInit
            // write pre-init user code here
            acceso = new LoginScreen(getDisplay());//GEN-BEGIN:|16-getter|1|16-postInit
            acceso.setLabelTexts("Username", "Password");
            acceso.setTitle("loginScreen");
            acceso.addCommand(LoginScreen.LOGIN_COMMAND);
            acceso.setCommandListener(this);
            acceso.setBGColor(-3355444);
            acceso.setFGColor(0);
            acceso.setUseLoginButton(false);
            acceso.setLoginButtonText("Login");//GEN-END:|16-getter|1|16-postInit
            // write post-init user code here
        }//GEN-BEGIN:|16-getter|2|
        return acceso;
    }
    //</editor-fold>//GEN-END:|16-getter|2|
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: menuPrincipal ">//GEN-BEGIN:|21-getter|0|21-preInit
    /**
     * Returns an initiliazed instance of menuPrincipal component.
     * @return the initialized component instance
     */
    public List getMenuPrincipal() {
        if (menuPrincipal == null) {//GEN-END:|21-getter|0|21-preInit
            // write pre-init user code here
            menuPrincipal = new List("list", Choice.IMPLICIT);//GEN-BEGIN:|21-getter|1|21-postInit
            menuPrincipal.append("Ingresar dinero", null);
            menuPrincipal.append("Pagar", null);
            menuPrincipal.append("Consultar Saldo", null);
            menuPrincipal.append("Historial", null);
            menuPrincipal.append("Promociones", null);
            menuPrincipal.append("Opciones", null);
            menuPrincipal.append("Salir", null);
            menuPrincipal.setCommandListener(this);
            menuPrincipal.setSelectedFlags(new boolean[] { false, false, false, false, false, false, false });//GEN-END:|21-getter|1|21-postInit
            // write post-init user code here
        }//GEN-BEGIN:|21-getter|2|
        return menuPrincipal;
    }
    //</editor-fold>//GEN-END:|21-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: menuPrincipalAction ">//GEN-BEGIN:|21-action|0|21-preAction
    /**
     * Performs an action assigned to the selected list element in the menuPrincipal component.
     */
    public void menuPrincipalAction() {//GEN-END:|21-action|0|21-preAction
        // enter pre-action user code here
        String __selectedString = getMenuPrincipal().getString(getMenuPrincipal().getSelectedIndex());//GEN-BEGIN:|21-action|1|25-preAction
        if (__selectedString != null) {
            if (__selectedString.equals("Ingresar dinero")) {//GEN-END:|21-action|1|25-preAction
                // write pre-action user code here
                switchDisplayable(null, getIngresarDinero());//GEN-LINE:|21-action|2|25-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Pagar")) {//GEN-LINE:|21-action|3|26-preAction
                // write pre-action user code here
                switchDisplayable(null, getPagar());//GEN-LINE:|21-action|4|26-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Consultar Saldo")) {//GEN-LINE:|21-action|5|27-preAction
                // write pre-action user code here
                switchDisplayable(null, getConsultarSaldo());//GEN-LINE:|21-action|6|27-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Historial")) {//GEN-LINE:|21-action|7|28-preAction
                // write pre-action user code here
                switchDisplayable(null, getHistorial());//GEN-LINE:|21-action|8|28-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Promociones")) {//GEN-LINE:|21-action|9|29-preAction
                // write pre-action user code here
                switchDisplayable(null, getPromociones());//GEN-LINE:|21-action|10|29-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Opciones")) {//GEN-LINE:|21-action|11|30-preAction
                // write pre-action user code here
                switchDisplayable(null, getOpciones());//GEN-LINE:|21-action|12|30-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Salir")) {//GEN-LINE:|21-action|13|145-preAction
                // write pre-action user code here
                exitMIDlet();//GEN-LINE:|21-action|14|145-postAction
                // write post-action user code here
            }//GEN-BEGIN:|21-action|15|21-postAction
        }//GEN-END:|21-action|15|21-postAction
        // enter post-action user code here
    }//GEN-BEGIN:|21-action|16|
    //</editor-fold>//GEN-END:|21-action|16|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: ingresarDinero ">//GEN-BEGIN:|31-getter|0|31-preInit
    /**
     * Returns an initiliazed instance of ingresarDinero component.
     * @return the initialized component instance
     */
    public Form getIngresarDinero() {
        if (ingresarDinero == null) {//GEN-END:|31-getter|0|31-preInit
            // write pre-init user code here
            ingresarDinero = new Form("Ingresar Dinero", new Item[] { getChoiceGroup(), getTextField() });//GEN-BEGIN:|31-getter|1|31-postInit
            ingresarDinero.addCommand(getOkCommand());
            ingresarDinero.addCommand(getBackCommand());
            ingresarDinero.setCommandListener(this);//GEN-END:|31-getter|1|31-postInit
            // write post-init user code here
        }//GEN-BEGIN:|31-getter|2|
        return ingresarDinero;
    }
    //</editor-fold>//GEN-END:|31-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup ">//GEN-BEGIN:|39-getter|0|39-preInit
    /**
     * Returns an initiliazed instance of choiceGroup component.
     * @return the initialized component instance
     */
    public ChoiceGroup getChoiceGroup() {
        if (choiceGroup == null) {//GEN-END:|39-getter|0|39-preInit
            // write pre-init user code here
            choiceGroup = new ChoiceGroup("Banco", Choice.POPUP);//GEN-BEGIN:|39-getter|1|39-postInit
            choiceGroup.append("Bancolombia", null);
            choiceGroup.append("Banco de Occidente", null);
            choiceGroup.append("Banco Caja Social", null);
            choiceGroup.setSelectedFlags(new boolean[] { false, false, false });//GEN-END:|39-getter|1|39-postInit
            // write post-init user code here
        }//GEN-BEGIN:|39-getter|2|
        return choiceGroup;
    }
    //</editor-fold>//GEN-END:|39-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField ">//GEN-BEGIN:|50-getter|0|50-preInit
    /**
     * Returns an initiliazed instance of textField component.
     * @return the initialized component instance
     */
    public TextField getTextField() {
        if (textField == null) {//GEN-END:|50-getter|0|50-preInit
            // write pre-init user code here
            textField = new TextField("Cantidad", "0", 32, TextField.NUMERIC);//GEN-BEGIN:|50-getter|1|50-postInit
            textField.setInitialInputMode("0");//GEN-END:|50-getter|1|50-postInit
            // write post-init user code here
        }//GEN-BEGIN:|50-getter|2|
        return textField;
    }
    //</editor-fold>//GEN-END:|50-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand ">//GEN-BEGIN:|45-getter|0|45-preInit
    /**
     * Returns an initiliazed instance of okCommand component.
     * @return the initialized component instance
     */
    public Command getOkCommand() {
        if (okCommand == null) {//GEN-END:|45-getter|0|45-preInit
            // write pre-init user code here
            okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|45-getter|1|45-postInit
            // write post-init user code here
        }//GEN-BEGIN:|45-getter|2|
        return okCommand;
    }
    //</editor-fold>//GEN-END:|45-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">//GEN-BEGIN:|47-getter|0|47-preInit
    /**
     * Returns an initiliazed instance of backCommand component.
     * @return the initialized component instance
     */
    public Command getBackCommand() {
        if (backCommand == null) {//GEN-END:|47-getter|0|47-preInit
            // write pre-init user code here
            backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|47-getter|1|47-postInit
            // write post-init user code here
        }//GEN-BEGIN:|47-getter|2|
        return backCommand;
    }
    //</editor-fold>//GEN-END:|47-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: consultarSaldo ">//GEN-BEGIN:|51-getter|0|51-preInit
    /**
     * Returns an initiliazed instance of consultarSaldo component.
     * @return the initialized component instance
     */
    public Form getConsultarSaldo() {
        if (consultarSaldo == null) {//GEN-END:|51-getter|0|51-preInit
            // write pre-init user code here
            consultarSaldo = new Form("Consultar Saldo", new Item[] { getStringItem() });//GEN-BEGIN:|51-getter|1|51-postInit
            consultarSaldo.addCommand(getBackCommand1());
            consultarSaldo.setCommandListener(this);//GEN-END:|51-getter|1|51-postInit
            // write post-init user code here
        }//GEN-BEGIN:|51-getter|2|
        return consultarSaldo;
    }
    //</editor-fold>//GEN-END:|51-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">//GEN-BEGIN:|52-getter|0|52-preInit
    /**
     * Returns an initiliazed instance of stringItem component.
     * @return the initialized component instance
     */
    public StringItem getStringItem() {
        if (stringItem == null) {//GEN-END:|52-getter|0|52-preInit
            // write pre-init user code here
            stringItem = new StringItem("", "Su saldo es 250000");//GEN-LINE:|52-getter|1|52-postInit
            // write post-init user code here
        }//GEN-BEGIN:|52-getter|2|
        return stringItem;
    }
    //</editor-fold>//GEN-END:|52-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand1 ">//GEN-BEGIN:|53-getter|0|53-preInit
    /**
     * Returns an initiliazed instance of backCommand1 component.
     * @return the initialized component instance
     */
    public Command getBackCommand1() {
        if (backCommand1 == null) {//GEN-END:|53-getter|0|53-preInit
            // write pre-init user code here
            backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|53-getter|1|53-postInit
            // write post-init user code here
        }//GEN-BEGIN:|53-getter|2|
        return backCommand1;
    }
    //</editor-fold>//GEN-END:|53-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: historial ">//GEN-BEGIN:|56-getter|0|56-preInit
    /**
     * Returns an initiliazed instance of historial component.
     * @return the initialized component instance
     */
    public Form getHistorial() {
        if (historial == null) {//GEN-END:|56-getter|0|56-preInit
            // write pre-init user code here
            historial = new Form("Historial Reciente", new Item[] { getStringItem1(), getStringItem2(), getStringItem4(), getStringItem3() });//GEN-BEGIN:|56-getter|1|56-postInit
            historial.addCommand(getBackCommand2());
            historial.setCommandListener(this);//GEN-END:|56-getter|1|56-postInit
            // write post-init user code here
        }//GEN-BEGIN:|56-getter|2|
        return historial;
    }
    //</editor-fold>//GEN-END:|56-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem1 ">//GEN-BEGIN:|57-getter|0|57-preInit
    /**
     * Returns an initiliazed instance of stringItem1 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem1() {
        if (stringItem1 == null) {//GEN-END:|57-getter|0|57-preInit
            // write pre-init user code here
            stringItem1 = new StringItem("Coca Cola:", "valor 1200");//GEN-LINE:|57-getter|1|57-postInit
            // write post-init user code here
        }//GEN-BEGIN:|57-getter|2|
        return stringItem1;
    }
    //</editor-fold>//GEN-END:|57-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem2 ">//GEN-BEGIN:|58-getter|0|58-preInit
    /**
     * Returns an initiliazed instance of stringItem2 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem2() {
        if (stringItem2 == null) {//GEN-END:|58-getter|0|58-preInit
            // write pre-init user code here
            stringItem2 = new StringItem("Gasolina Terpel corriente:", "valor 30000");//GEN-LINE:|58-getter|1|58-postInit
            // write post-init user code here
        }//GEN-BEGIN:|58-getter|2|
        return stringItem2;
    }
    //</editor-fold>//GEN-END:|58-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem3 ">//GEN-BEGIN:|59-getter|0|59-preInit
    /**
     * Returns an initiliazed instance of stringItem3 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem3() {
        if (stringItem3 == null) {//GEN-END:|59-getter|0|59-preInit
            // write pre-init user code here
            stringItem3 = new StringItem("Parqueadero:", "valor 2500");//GEN-LINE:|59-getter|1|59-postInit
            // write post-init user code here
        }//GEN-BEGIN:|59-getter|2|
        return stringItem3;
    }
    //</editor-fold>//GEN-END:|59-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem4 ">//GEN-BEGIN:|60-getter|0|60-preInit
    /**
     * Returns an initiliazed instance of stringItem4 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem4() {
        if (stringItem4 == null) {//GEN-END:|60-getter|0|60-preInit
            // write pre-init user code here
            stringItem4 = new StringItem("Tiquete cinemark:", "valor 5000");//GEN-LINE:|60-getter|1|60-postInit
            // write post-init user code here
        }//GEN-BEGIN:|60-getter|2|
        return stringItem4;
    }
    //</editor-fold>//GEN-END:|60-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand2 ">//GEN-BEGIN:|61-getter|0|61-preInit
    /**
     * Returns an initiliazed instance of backCommand2 component.
     * @return the initialized component instance
     */
    public Command getBackCommand2() {
        if (backCommand2 == null) {//GEN-END:|61-getter|0|61-preInit
            // write pre-init user code here
            backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|61-getter|1|61-postInit
            // write post-init user code here
        }//GEN-BEGIN:|61-getter|2|
        return backCommand2;
    }
    //</editor-fold>//GEN-END:|61-getter|2|



    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: promociones ">//GEN-BEGIN:|65-getter|0|65-preInit
    /**
     * Returns an initiliazed instance of promociones component.
     * @return the initialized component instance
     */
    public List getPromociones() {
        if (promociones == null) {//GEN-END:|65-getter|0|65-preInit
            // write pre-init user code here
            promociones = new List("Lista de establecimientos", Choice.IMPLICIT);//GEN-BEGIN:|65-getter|1|65-postInit
            promociones.append("Cinemark", null);
            promociones.append("El corral", null);
            promociones.append("La Locura", null);
            promociones.append("Tennis", null);
            promociones.addCommand(getBackCommand3());
            promociones.setCommandListener(this);
            promociones.setSelectedFlags(new boolean[] { false, false, false, false });//GEN-END:|65-getter|1|65-postInit
            // write post-init user code here
        }//GEN-BEGIN:|65-getter|2|
        return promociones;
    }
    //</editor-fold>//GEN-END:|65-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: promocionesAction ">//GEN-BEGIN:|65-action|0|65-preAction
    /**
     * Performs an action assigned to the selected list element in the promociones component.
     */
    public void promocionesAction() {//GEN-END:|65-action|0|65-preAction
        // enter pre-action user code here
        String __selectedString = getPromociones().getString(getPromociones().getSelectedIndex());//GEN-BEGIN:|65-action|1|68-preAction
        if (__selectedString != null) {
            if (__selectedString.equals("Cinemark")) {//GEN-END:|65-action|1|68-preAction
                // write pre-action user code here
                switchDisplayable(null, getDetallePromociones());//GEN-LINE:|65-action|2|68-postAction
                // write post-action user code here
            } else if (__selectedString.equals("El corral")) {//GEN-LINE:|65-action|3|69-preAction
                // write pre-action user code here
                switchDisplayable(null, getDetallePromociones());//GEN-LINE:|65-action|4|69-postAction
                // write post-action user code here
            } else if (__selectedString.equals("La Locura")) {//GEN-LINE:|65-action|5|70-preAction
                // write pre-action user code here
                switchDisplayable(null, getDetallePromociones());//GEN-LINE:|65-action|6|70-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Tennis")) {//GEN-LINE:|65-action|7|71-preAction
                // write pre-action user code here
                switchDisplayable(null, getDetallePromociones());//GEN-LINE:|65-action|8|71-postAction
                // write post-action user code here
            }//GEN-BEGIN:|65-action|9|65-postAction
        }//GEN-END:|65-action|9|65-postAction
        // enter post-action user code here
    }//GEN-BEGIN:|65-action|10|
    //</editor-fold>//GEN-END:|65-action|10|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand3 ">//GEN-BEGIN:|72-getter|0|72-preInit
    /**
     * Returns an initiliazed instance of backCommand3 component.
     * @return the initialized component instance
     */
    public Command getBackCommand3() {
        if (backCommand3 == null) {//GEN-END:|72-getter|0|72-preInit
            // write pre-init user code here
            backCommand3 = new Command("Back", Command.BACK, 0);//GEN-LINE:|72-getter|1|72-postInit
            // write post-init user code here
        }//GEN-BEGIN:|72-getter|2|
        return backCommand3;
    }
    //</editor-fold>//GEN-END:|72-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand1 ">//GEN-BEGIN:|74-getter|0|74-preInit
    /**
     * Returns an initiliazed instance of okCommand1 component.
     * @return the initialized component instance
     */
    public Command getOkCommand1() {
        if (okCommand1 == null) {//GEN-END:|74-getter|0|74-preInit
            // write pre-init user code here
            okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|74-getter|1|74-postInit
            // write post-init user code here
        }//GEN-BEGIN:|74-getter|2|
        return okCommand1;
    }
    //</editor-fold>//GEN-END:|74-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: detallePromociones ">//GEN-BEGIN:|76-getter|0|76-preInit
    /**
     * Returns an initiliazed instance of detallePromociones component.
     * @return the initialized component instance
     */
    public Form getDetallePromociones() {
        if (detallePromociones == null) {//GEN-END:|76-getter|0|76-preInit
            // write pre-init user code here
            detallePromociones = new Form("Promocion", new Item[] { getStringItem5() });//GEN-BEGIN:|76-getter|1|76-postInit
            detallePromociones.addCommand(getOkCommand2());
            detallePromociones.setCommandListener(this);//GEN-END:|76-getter|1|76-postInit
            // write post-init user code here
        }//GEN-BEGIN:|76-getter|2|
        return detallePromociones;
    }
    //</editor-fold>//GEN-END:|76-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem5 ">//GEN-BEGIN:|77-getter|0|77-preInit
    /**
     * Returns an initiliazed instance of stringItem5 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem5() {
        if (stringItem5 == null) {//GEN-END:|77-getter|0|77-preInit
            // write pre-init user code here
            stringItem5 = new StringItem("Aviso", "Las promociones no estan disponibles en este momento");//GEN-LINE:|77-getter|1|77-postInit
            // write post-init user code here
        }//GEN-BEGIN:|77-getter|2|
        return stringItem5;
    }
    //</editor-fold>//GEN-END:|77-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand2 ">//GEN-BEGIN:|78-getter|0|78-preInit
    /**
     * Returns an initiliazed instance of okCommand2 component.
     * @return the initialized component instance
     */
    public Command getOkCommand2() {
        if (okCommand2 == null) {//GEN-END:|78-getter|0|78-preInit
            // write pre-init user code here
            okCommand2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|78-getter|1|78-postInit
            // write post-init user code here
        }//GEN-BEGIN:|78-getter|2|
        return okCommand2;
    }
    //</editor-fold>//GEN-END:|78-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand4 ">//GEN-BEGIN:|80-getter|0|80-preInit
    /**
     * Returns an initiliazed instance of backCommand4 component.
     * @return the initialized component instance
     */
    public Command getBackCommand4() {
        if (backCommand4 == null) {//GEN-END:|80-getter|0|80-preInit
            // write pre-init user code here
            backCommand4 = new Command("Back", Command.BACK, 0);//GEN-LINE:|80-getter|1|80-postInit
            // write post-init user code here
        }//GEN-BEGIN:|80-getter|2|
        return backCommand4;
    }
    //</editor-fold>//GEN-END:|80-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: opciones ">//GEN-BEGIN:|90-getter|0|90-preInit
    /**
     * Returns an initiliazed instance of opciones component.
     * @return the initialized component instance
     */
    public Form getOpciones() {
        if (opciones == null) {//GEN-END:|90-getter|0|90-preInit
            // write pre-init user code here
            opciones = new Form("Opciones", new Item[] { getTextField1(), getChoiceGroup1(), getChoiceGroup2() });//GEN-BEGIN:|90-getter|1|90-postInit
            opciones.addCommand(getOkCommand3());
            opciones.addCommand(getCancelCommand());
            opciones.setCommandListener(this);//GEN-END:|90-getter|1|90-postInit
            // write post-init user code here
        }//GEN-BEGIN:|90-getter|2|
        return opciones;
    }
    //</editor-fold>//GEN-END:|90-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField1 ">//GEN-BEGIN:|91-getter|0|91-preInit
    /**
     * Returns an initiliazed instance of textField1 component.
     * @return the initialized component instance
     */
    public TextField getTextField1() {
        if (textField1 == null) {//GEN-END:|91-getter|0|91-preInit
            // write pre-init user code here
            textField1 = new TextField("Nombre", "", 32, TextField.ANY);//GEN-LINE:|91-getter|1|91-postInit
            // write post-init user code here
        }//GEN-BEGIN:|91-getter|2|
        return textField1;
    }
    //</editor-fold>//GEN-END:|91-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup1 ">//GEN-BEGIN:|92-getter|0|92-preInit
    /**
     * Returns an initiliazed instance of choiceGroup1 component.
     * @return the initialized component instance
     */
    public ChoiceGroup getChoiceGroup1() {
        if (choiceGroup1 == null) {//GEN-END:|92-getter|0|92-preInit
            // write pre-init user code here
            choiceGroup1 = new ChoiceGroup("Aceptar todas las promociones", Choice.EXCLUSIVE);//GEN-BEGIN:|92-getter|1|92-postInit
            choiceGroup1.append("S\u00ED", null);
            choiceGroup1.append("No", null);
            choiceGroup1.setSelectedFlags(new boolean[] { false, false });//GEN-END:|92-getter|1|92-postInit
            // write post-init user code here
        }//GEN-BEGIN:|92-getter|2|
        return choiceGroup1;
    }
    //</editor-fold>//GEN-END:|92-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup2 ">//GEN-BEGIN:|95-getter|0|95-preInit
    /**
     * Returns an initiliazed instance of choiceGroup2 component.
     * @return the initialized component instance
     */
    public ChoiceGroup getChoiceGroup2() {
        if (choiceGroup2 == null) {//GEN-END:|95-getter|0|95-preInit
            // write pre-init user code here
            choiceGroup2 = new ChoiceGroup("Preguntar antes de hacer una transacci\u00F3n", Choice.EXCLUSIVE);//GEN-BEGIN:|95-getter|1|95-postInit
            choiceGroup2.append("S\u00ED", null);
            choiceGroup2.append("No", null);
            choiceGroup2.setSelectedFlags(new boolean[] { false, false });//GEN-END:|95-getter|1|95-postInit
            // write post-init user code here
        }//GEN-BEGIN:|95-getter|2|
        return choiceGroup2;
    }
    //</editor-fold>//GEN-END:|95-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand5 ">//GEN-BEGIN:|98-getter|0|98-preInit
    /**
     * Returns an initiliazed instance of backCommand5 component.
     * @return the initialized component instance
     */
    public Command getBackCommand5() {
        if (backCommand5 == null) {//GEN-END:|98-getter|0|98-preInit
            // write pre-init user code here
            backCommand5 = new Command("Back", Command.BACK, 0);//GEN-LINE:|98-getter|1|98-postInit
            // write post-init user code here
        }//GEN-BEGIN:|98-getter|2|
        return backCommand5;
    }
    //</editor-fold>//GEN-END:|98-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand3 ">//GEN-BEGIN:|100-getter|0|100-preInit
    /**
     * Returns an initiliazed instance of okCommand3 component.
     * @return the initialized component instance
     */
    public Command getOkCommand3() {
        if (okCommand3 == null) {//GEN-END:|100-getter|0|100-preInit
            // write pre-init user code here
            okCommand3 = new Command("Ok", Command.OK, 0);//GEN-LINE:|100-getter|1|100-postInit
            // write post-init user code here
        }//GEN-BEGIN:|100-getter|2|
        return okCommand3;
    }
    //</editor-fold>//GEN-END:|100-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: cancelCommand ">//GEN-BEGIN:|102-getter|0|102-preInit
    /**
     * Returns an initiliazed instance of cancelCommand component.
     * @return the initialized component instance
     */
    public Command getCancelCommand() {
        if (cancelCommand == null) {//GEN-END:|102-getter|0|102-preInit
            // write pre-init user code here
            cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|102-getter|1|102-postInit
            // write post-init user code here
        }//GEN-BEGIN:|102-getter|2|
        return cancelCommand;
    }
    //</editor-fold>//GEN-END:|102-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: helpCommand ">//GEN-BEGIN:|104-getter|0|104-preInit
    /**
     * Returns an initiliazed instance of helpCommand component.
     * @return the initialized component instance
     */
    public Command getHelpCommand() {
        if (helpCommand == null) {//GEN-END:|104-getter|0|104-preInit
            // write pre-init user code here
            helpCommand = new Command("Help", Command.HELP, 0);//GEN-LINE:|104-getter|1|104-postInit
            // write post-init user code here
        }//GEN-BEGIN:|104-getter|2|
        return helpCommand;
    }
    //</editor-fold>//GEN-END:|104-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: pagar ">//GEN-BEGIN:|107-getter|0|107-preInit
    /**
     * Returns an initiliazed instance of pagar component.
     * @return the initialized component instance
     */
    public Form getPagar() {
        if (pagar == null) {//GEN-END:|107-getter|0|107-preInit
            // write pre-init user code here
            pagar = new Form("Realizar la transacci\u00F3n", new Item[] { getChoiceGroup3() });//GEN-BEGIN:|107-getter|1|107-postInit
            pagar.addCommand(getOkCommand4());
            pagar.addCommand(getBackCommand6());
            pagar.setCommandListener(this);//GEN-END:|107-getter|1|107-postInit
            // write post-init user code here
        }//GEN-BEGIN:|107-getter|2|
        return pagar;
    }
    //</editor-fold>//GEN-END:|107-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: choiceGroup3 ">//GEN-BEGIN:|108-getter|0|108-preInit
    /**
     * Returns an initiliazed instance of choiceGroup3 component.
     * @return the initialized component instance
     */
    public ChoiceGroup getChoiceGroup3() {
        if (choiceGroup3 == null) {//GEN-END:|108-getter|0|108-preInit
            // write pre-init user code here
            choiceGroup3 = new ChoiceGroup("Producto", Choice.POPUP);//GEN-BEGIN:|108-getter|1|108-postInit
            choiceGroup3.append("Tiquete bus", null);
            choiceGroup3.append("Entrada Cine", null);
            choiceGroup3.setSelectedFlags(new boolean[] { false, true });//GEN-END:|108-getter|1|108-postInit
            // write post-init user code here
        }//GEN-BEGIN:|108-getter|2|
        return choiceGroup3;
    }
    //</editor-fold>//GEN-END:|108-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: compra ">//GEN-BEGIN:|115-getter|0|115-preInit
    /**
     * Returns an initiliazed instance of compra component.
     * @return the initialized component instance
     */
    public Form getCompra() {
        if (compra == null) {//GEN-END:|115-getter|0|115-preInit
            // write pre-init user code here
            compra = new Form("Detalle de la compra", new Item[] { getStringItem6(), getStringItem7(), getStringItem9(), getStringItem8(), getStringItem10(), getImageItem() });//GEN-BEGIN:|115-getter|1|115-postInit
            compra.addCommand(getOkCommand5());
            compra.addCommand(getCancelCommand1());
            compra.addCommand(getItemCommand());
            compra.setCommandListener(this);//GEN-END:|115-getter|1|115-postInit
            // write post-init user code here
        }//GEN-BEGIN:|115-getter|2|
        return compra;
    }
    //</editor-fold>//GEN-END:|115-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem6 ">//GEN-BEGIN:|116-getter|0|116-preInit
    /**
     * Returns an initiliazed instance of stringItem6 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem6() {
        if (stringItem6 == null) {//GEN-END:|116-getter|0|116-preInit
            // write pre-init user code here
            stringItem6 = new StringItem("Producto:", "Tiquete bus");//GEN-LINE:|116-getter|1|116-postInit
            // write post-init user code here
        }//GEN-BEGIN:|116-getter|2|
        return stringItem6;
    }
    //</editor-fold>//GEN-END:|116-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem7 ">//GEN-BEGIN:|117-getter|0|117-preInit
    /**
     * Returns an initiliazed instance of stringItem7 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem7() {
        if (stringItem7 == null) {//GEN-END:|117-getter|0|117-preInit
            // write pre-init user code here
            stringItem7 = new StringItem("Valor:", "1200");//GEN-LINE:|117-getter|1|117-postInit
            // write post-init user code here
        }//GEN-BEGIN:|117-getter|2|
        return stringItem7;
    }
    //</editor-fold>//GEN-END:|117-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem8 ">//GEN-BEGIN:|118-getter|0|118-preInit
    /**
     * Returns an initiliazed instance of stringItem8 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem8() {
        if (stringItem8 == null) {//GEN-END:|118-getter|0|118-preInit
            // write pre-init user code here
            stringItem8 = new StringItem("Sitio de la compra:", "cajero 18");//GEN-LINE:|118-getter|1|118-postInit
            // write post-init user code here
        }//GEN-BEGIN:|118-getter|2|
        return stringItem8;
    }
    //</editor-fold>//GEN-END:|118-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem9 ">//GEN-BEGIN:|119-getter|0|119-preInit
    /**
     * Returns an initiliazed instance of stringItem9 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem9() {
        if (stringItem9 == null) {//GEN-END:|119-getter|0|119-preInit
            // write pre-init user code here
            stringItem9 = new StringItem("cantidad:", "1");//GEN-LINE:|119-getter|1|119-postInit
            // write post-init user code here
        }//GEN-BEGIN:|119-getter|2|
        return stringItem9;
    }
    //</editor-fold>//GEN-END:|119-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem10 ">//GEN-BEGIN:|120-getter|0|120-preInit
    /**
     * Returns an initiliazed instance of stringItem10 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem10() {
        if (stringItem10 == null) {//GEN-END:|120-getter|0|120-preInit
            // write pre-init user code here
            stringItem10 = new StringItem("Total:", "1200");//GEN-LINE:|120-getter|1|120-postInit
            // write post-init user code here
        }//GEN-BEGIN:|120-getter|2|
        return stringItem10;
    }
    //</editor-fold>//GEN-END:|120-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand4 ">//GEN-BEGIN:|111-getter|0|111-preInit
    /**
     * Returns an initiliazed instance of okCommand4 component.
     * @return the initialized component instance
     */
    public Command getOkCommand4() {
        if (okCommand4 == null) {//GEN-END:|111-getter|0|111-preInit
            // write pre-init user code here
            okCommand4 = new Command("Ok", Command.OK, 0);//GEN-LINE:|111-getter|1|111-postInit
            // write post-init user code here
        }//GEN-BEGIN:|111-getter|2|
        return okCommand4;
    }
    //</editor-fold>//GEN-END:|111-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand6 ">//GEN-BEGIN:|113-getter|0|113-preInit
    /**
     * Returns an initiliazed instance of backCommand6 component.
     * @return the initialized component instance
     */
    public Command getBackCommand6() {
        if (backCommand6 == null) {//GEN-END:|113-getter|0|113-preInit
            // write pre-init user code here
            backCommand6 = new Command("Back", Command.BACK, 0);//GEN-LINE:|113-getter|1|113-postInit
            // write post-init user code here
        }//GEN-BEGIN:|113-getter|2|
        return backCommand6;
    }
    //</editor-fold>//GEN-END:|113-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand5 ">//GEN-BEGIN:|121-getter|0|121-preInit
    /**
     * Returns an initiliazed instance of okCommand5 component.
     * @return the initialized component instance
     */
    public Command getOkCommand5() {
        if (okCommand5 == null) {//GEN-END:|121-getter|0|121-preInit
            // write pre-init user code here
            okCommand5 = new Command("Ok", Command.OK, 0);//GEN-LINE:|121-getter|1|121-postInit
            // write post-init user code here
        }//GEN-BEGIN:|121-getter|2|
        return okCommand5;
    }
    //</editor-fold>//GEN-END:|121-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: cancelCommand1 ">//GEN-BEGIN:|123-getter|0|123-preInit
    /**
     * Returns an initiliazed instance of cancelCommand1 component.
     * @return the initialized component instance
     */
    public Command getCancelCommand1() {
        if (cancelCommand1 == null) {//GEN-END:|123-getter|0|123-preInit
            // write pre-init user code here
            cancelCommand1 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|123-getter|1|123-postInit
            // write post-init user code here
        }//GEN-BEGIN:|123-getter|2|
        return cancelCommand1;
    }
    //</editor-fold>//GEN-END:|123-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: alert ">//GEN-BEGIN:|126-getter|0|126-preInit
    /**
     * Returns an initiliazed instance of alert component.
     * @return the initialized component instance
     */
    public Alert getAlert() {
        if (alert == null) {//GEN-END:|126-getter|0|126-preInit
            // write pre-init user code here
            alert = new Alert("Informaci\u00F3n", "Gracias por su compra", null, null);//GEN-BEGIN:|126-getter|1|126-postInit
            alert.setTimeout(Alert.FOREVER);//GEN-END:|126-getter|1|126-postInit
            // write post-init user code here
        }//GEN-BEGIN:|126-getter|2|
        return alert;
    }
    //</editor-fold>//GEN-END:|126-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand7 ">//GEN-BEGIN:|131-getter|0|131-preInit
    /**
     * Returns an initiliazed instance of backCommand7 component.
     * @return the initialized component instance
     */
    public Command getBackCommand7() {
        if (backCommand7 == null) {//GEN-END:|131-getter|0|131-preInit
            // write pre-init user code here
            backCommand7 = new Command("Back", Command.BACK, 0);//GEN-LINE:|131-getter|1|131-postInit
            // write post-init user code here
        }//GEN-BEGIN:|131-getter|2|
        return backCommand7;
    }
    //</editor-fold>//GEN-END:|131-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: alert1 ">//GEN-BEGIN:|138-getter|0|138-preInit
    /**
     * Returns an initiliazed instance of alert1 component.
     * @return the initialized component instance
     */
    public Alert getAlert1() {
        if (alert1 == null) {//GEN-END:|138-getter|0|138-preInit
            // write pre-init user code here
            alert1 = new Alert("Informaci\u00F3n", "Dinero cargado", null, null);//GEN-BEGIN:|138-getter|1|138-postInit
            alert1.setTimeout(Alert.FOREVER);//GEN-END:|138-getter|1|138-postInit
            // write post-init user code here
        }//GEN-BEGIN:|138-getter|2|
        return alert1;
    }
    //</editor-fold>//GEN-END:|138-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: alert2 ">//GEN-BEGIN:|142-getter|0|142-preInit
    /**
     * Returns an initiliazed instance of alert2 component.
     * @return the initialized component instance
     */
    public Alert getAlert2() {
        if (alert2 == null) {//GEN-END:|142-getter|0|142-preInit
            // write pre-init user code here
            alert2 = new Alert("Informaci\u00F3n", "La nueva configuracion ha sido guardada", null, null);//GEN-BEGIN:|142-getter|1|142-postInit
            alert2.setTimeout(Alert.FOREVER);//GEN-END:|142-getter|1|142-postInit
            // write post-init user code here
        }//GEN-BEGIN:|142-getter|2|
        return alert2;
    }
    //</editor-fold>//GEN-END:|142-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: imageItem ">//GEN-BEGIN:|147-getter|0|147-preInit
    /**
     * Returns an initiliazed instance of imageItem component.
     * @return the initialized component instance
     */
    public ImageItem getImageItem() {
        if (imageItem == null) {//GEN-END:|147-getter|0|147-preInit
            // write pre-init user code here
            imageItem = new ImageItem("Vista previa", getImage1(), ImageItem.LAYOUT_DEFAULT, "<Missing Image>");//GEN-LINE:|147-getter|1|147-postInit
            // write post-init user code here
        }//GEN-BEGIN:|147-getter|2|
        return imageItem;
    }
    //</editor-fold>//GEN-END:|147-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: image1 ">//GEN-BEGIN:|148-getter|0|148-preInit
    /**
     * Returns an initiliazed instance of image1 component.
     * @return the initialized component instance
     */
    public Image getImage1() {
        if (image1 == null) {//GEN-END:|148-getter|0|148-preInit
            // write pre-init user code here
            try {//GEN-BEGIN:|148-getter|1|148-@java.io.IOException
                image1 = Image.createImage("/bus.jpeg");
            } catch (java.io.IOException e) {//GEN-END:|148-getter|1|148-@java.io.IOException
                e.printStackTrace();
            }//GEN-LINE:|148-getter|2|148-postInit
            // write post-init user code here
        }//GEN-BEGIN:|148-getter|3|
        return image1;
    }
    //</editor-fold>//GEN-END:|148-getter|3|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: itemCommand ">//GEN-BEGIN:|149-getter|0|149-preInit
    /**
     * Returns an initiliazed instance of itemCommand component.
     * @return the initialized component instance
     */
    public Command getItemCommand() {
        if (itemCommand == null) {//GEN-END:|149-getter|0|149-preInit
            // write pre-init user code here
            itemCommand = new Command("Item", Command.ITEM, 0);//GEN-LINE:|149-getter|1|149-postInit
            // write post-init user code here
        }//GEN-BEGIN:|149-getter|2|
        return itemCommand;
    }
    //</editor-fold>//GEN-END:|149-getter|2|
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: Localizacion ">//GEN-BEGIN:|151-getter|0|151-preInit
    /**
     * Returns an initiliazed instance of Localizacion component.
     * @return the initialized component instance
     */
    public Form getLocalizacion() {
        if (Localizacion == null) {//GEN-END:|151-getter|0|151-preInit
            // write pre-init user code here
            Localizacion = new Form("Localizaci\u00F3n", new Item[] { getImageItem1() });//GEN-BEGIN:|151-getter|1|151-postInit
            Localizacion.addCommand(getBackCommand8());
            Localizacion.setCommandListener(this);//GEN-END:|151-getter|1|151-postInit
            // write post-init user code here
        }//GEN-BEGIN:|151-getter|2|
        return Localizacion;
    }
    //</editor-fold>//GEN-END:|151-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: imageItem1 ">//GEN-BEGIN:|152-getter|0|152-preInit
    /**
     * Returns an initiliazed instance of imageItem1 component.
     * @return the initialized component instance
     */
    public ImageItem getImageItem1() {
        if (imageItem1 == null) {//GEN-END:|152-getter|0|152-preInit
            // write pre-init user code here
            imageItem1 = new ImageItem("Mapa de estaciones de bus", getImage2(), ImageItem.LAYOUT_DEFAULT, "<Missing Image>");//GEN-LINE:|152-getter|1|152-postInit
            // write post-init user code here
        }//GEN-BEGIN:|152-getter|2|
        return imageItem1;
    }
    //</editor-fold>//GEN-END:|152-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand8 ">//GEN-BEGIN:|154-getter|0|154-preInit
    /**
     * Returns an initiliazed instance of backCommand8 component.
     * @return the initialized component instance
     */
    public Command getBackCommand8() {
        if (backCommand8 == null) {//GEN-END:|154-getter|0|154-preInit
            // write pre-init user code here
            backCommand8 = new Command("Back", Command.BACK, 0);//GEN-LINE:|154-getter|1|154-postInit
            // write post-init user code here
        }//GEN-BEGIN:|154-getter|2|
        return backCommand8;
    }
    //</editor-fold>//GEN-END:|154-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: image2 ">//GEN-BEGIN:|153-getter|0|153-preInit
    /**
     * Returns an initiliazed instance of image2 component.
     * @return the initialized component instance
     */
    public Image getImage2() {
        if (image2 == null) {//GEN-END:|153-getter|0|153-preInit
            // write pre-init user code here
            try {//GEN-BEGIN:|153-getter|1|153-@java.io.IOException
                image2 = Image.createImage("/mapa_accesos200.jpg");
            } catch (java.io.IOException e) {//GEN-END:|153-getter|1|153-@java.io.IOException
                e.printStackTrace();
            }//GEN-LINE:|153-getter|2|153-postInit
            // write post-init user code here
        }//GEN-BEGIN:|153-getter|3|
        return image2;
    }
    //</editor-fold>//GEN-END:|153-getter|3|

    /**
     * Returns a display instance.
     * @return the display instance.
     */
    public Display getDisplay () {
        return Display.getDisplay(this);
    }

    /**
     * Exits MIDlet.
     */
    public void exitMIDlet() {
        switchDisplayable (null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    /**
     * Called when MIDlet is started.
     * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
     */
    public void startApp() {
        if (midletPaused) {
            resumeMIDlet ();
        } else {
            initialize ();
            startMIDlet ();
        }
        midletPaused = false;
    }

    /**
     * Called when MIDlet is paused.
     */
    public void pauseApp() {
        midletPaused = true;
    }

    /**
     * Called to signal the MIDlet to terminate.
     * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
     */
    public void destroyApp(boolean unconditional) {
    }

}
